package files;

import java.io.File;
import java.io.FileFilter;
import java.io.FilenameFilter;

/**
 * @Description
 * @Author zhaobaolin
 * @Date 2018/11/13
 */
public class FilterExt implements FileFilter {
    protected String ext;
    public FilterExt(String str){
        ext = "."+str;
    }
    @Override
    public boolean accept(File pathname) {
        String name = pathname.getName();
        return name.endsWith(ext);
    }
}
